home *** CD-ROM | disk | FTP | other *** search
- /* Call Back Door by Larry Cloud - MEBBS #M3001 6/14/94 */
-
- signal on ERROR
- parse arg LineNumber
- options results
- DoorName = "Call Back Door"
- author = "Larry Cloud"
- sysop="Keith Kittlesen"
- if( ~show( 'l', "mebbsarexx.library" ) )then do
- if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
- say "Could not open library"
- exit 10
- end
- end
-
- call GetVar DoorName,LineNumber,1
- username = result
- call GetVar Doorname,Linenumber,20
- access=result
- call GetVar DoorName,LineNumber,2
- password=result
- call GetVar DoorName,LineNumber,3
- address=result
- call GetVar DoorName,LineNumber,4
- city=result
- call GetVar DoorName,LineNumber,5
- state=result
- call GetVar DoorName,LineNumber,7
- telephone=result
-
- sent=0
- badpw=0
- subject="Aborted" /* This will get changed if we actually DO something */
- if access < 1 then signal main
- subject="Already Validated"
- call blank
- string="You're already validated. This door will do nothing for you now."
- call output
- call blank
- signal getout
-
- main:
- string="Welcome to Larry's Call Back Validation Door, "username
- call output
- call blank
- string="You will be asked to enter the phone number that you wish this BBS to"
- call output
- string="call. You will need to enter it on three separate lines:"
- call output
- call blank
- string="Line 1: Area Code (Western Washington is 206)."
- call output
- string="Line 2: Prefix (the prefix here at Kitt's Korner is 698)."
- call output
- string="Line 3: The Suffix (the suffix here at Kitt's Korner is 0515)."
- call output
- call blank
- string="The BBS will then determine if it can call you back. If it can't, it"
- call output
- string="will inform you so, and your account will have to be updated manually."
- call output
- string="Don't worry, I'll inform the sysop via E-Mail if thats the case."
- call output
- call blank
- string="Next, if it IS feasible to call you back, you will experience a dropped"
- call output
- string="carrier. As soon as that happens, type the letters ATA on your keyboard."
- call output
- string="as SOON as your phone rings, hit your ENTER key. By doing so, you've"
- call output
- string="told your modem to AUTOANSWER. Once our modems negotiate the connection,"
- call output
- string="you will be asked to enter your name. Once you do this, you will be asked"
- call output
- string="to enter your password. If you do both of these right, your access level"
- call output
- string="will be raised to that of a normal user. The sysop will be informed,"
- call output
- string="either way, of the outcome of this transaction."
- call output
- call blank
- string="Press return..."
- call getkey
- call blank
- string="Next, you will be sent a file called "ALLFILES.TXT", which is an up-to-date"
- call output
- string="listing of all of the downloadable files on this BBS, as of midnight this"
- call output
- string="date. Once all of that is done, you will be credited an additional fifteen"
- call output
- string="minutes, to do with as you please."
- call output
- call blank
- string="If, for some reason, the BBS doesn't call you right back, you'll need to"
- call output
- string="run this program again, unless the sysop manually validates you before you"
- call output
- string="get the chance to run it again. OK, here we go..."
- call output
- call blank
- string="Press return..."
- call getkey
-
- getareacode:
- call blank
- string="Please enter your area code (Press Q for QUIT or press enter for 206):"
- length=4
- call input
- if typed="" then typed="206"
- if upper(typed)="Q" then signal getout
- if datatype(typed) ~="NUM" then signal getareacode
- if length(typed) ~=3 then signal getareacode
- call checkvalidareacode
- if badarea=1 then signal getareacode
- areacode=typed
-
- getprefix:
- call blank
- string="Please enter your three digit prefix:"
- length=4
- call input
- if typed="" then signal getprefix
- if datatype(typed) ~="NUM" then signal getprefix
- if length(typed) ~=3 then signal getprefix
- call checkvalidprefix
- call blank
- prefix=typed
-
- getsuffix:
- call blank
- string="Please enter your four digit suffix:"
- length=5
- call input
- if typed="" then signal getsuffix
- if datatype(typed) ~="NUM" then signal getsuffix
- if length(typed) ~=4 then signal getsuffix
- call blank
- call blank
- suffix=typed
-
- string="You have entered: "areacode"-"prefix"-"suffix" for your number. Is this"
- call output
- string="correct? (Y/n) "
- call getkey
- if upper(hot)="N" then signal getareacode
- string="Yes"
- call output
- call blank
- string="OK, I'm about to call you back. Remember, as soon as the carrier drops,"
- call output
- string="type ATA, and when your phone rings, hit Enter."
- call output
- call blank
- string="Press any key to drop carrier and initiate callback..."
- call getkey
- call blank
- phonenumber=prefix||suffix
- call callback
- call blank
- string="Hi, this is Kitt's Korner BBS, performing a call-back verification for"
- call output
- string=username
- call output
- string=address
- call output
- string=city||", "||state
- call output
-
- getpassword:
- call blank
- call blank
- string="Please enter your password that you originally logged onto this BBS with."
- call output
- string=""
- length=18
- call input
- typed=upper(typed)
- if password=typed then signal goodpassword
- badpw=badpw+1
- call blank
- string="That is incorrect."
- call output
- if badpw=3 then do
- string="one more chance..."
- call output
- end
- if badpw < 4 then signal getpassword
- call blank
- string="Sorry, that is not the password that you originally entered. The sysop"
- call output
- string="has been notified. Your access level will remain at access level 0."
- call output
- call blank
- subject="Bad Password"
- call informsysop
- signal getout
-
- informsysop:
- string = "E-Mail"
- stype=1
- call getmbnum
- answer=result
- if answer = -1 then signal error /* Doesn't exist! */
- to=sysop
- from="Larrys Callback Door"
- BaseNo = answer
- bodypath="doors:callback/aborted.txt"
- if subject="Bad Password" then bodypath="doors:callback/badpw.txt"
- if subject="Success" then bodypath="doors:callback/success.txt"
- if subject="Already Validated" then bodypath="doors:callback/already.txt"
- subject=username
- Attach = "0"
- Private = "1"
- Pound = "#"
- InfoString = From||Pound||To||Pound||Subject||Pound||BodyPath||Pound||BaseNo||Pound||Attach||Pound||Private
- call RobotMessage DoorName,InfoString
- if upper(result)="ABORTED" then signal error
- sent=1
- return
-
- goodpassword:
- string="See, that wasn't so hard. Your access level has been changed to access"
- call output
- string="level two, normal user access. The sysop has been informed of the success."
- call output
- call changelevel doorname,linenumber,2
- subject="Success"
- call informsysop
- string="Now, I'll send you the ALLFILES.TXT file, a listing of all the downloable"
- call output
- string="files on this BBS. This list was accurate as of 12:01am this morning."
- call output
- call sendbinfile doorname,linenumber,"dh1:mebbs/files/gtext/allfiles.txt"
- call blank
- string="Almost done. For being such a good sport and using this door, I'm crediting"
- call output
- string="you with 30 extra minutes for this call."
- call output
- minutes=30
- call addtime
- string="If you don't plan on using this extra time, you should deposit it into the"
- call output
- string="time bank door for future use."
- call output
- call blank
- signal getout
-
-
- checkvalidareacode:
- if typed ~="206" then do
- call blank
- string="Sorry, this program is not configured to handle out of state calls."
- call output
- call blank
- string="Press return..."
- call getkey
- signal getout
- end
- return
-
- checkvalidprefix:
- if exists("doors:callback/prefix") then do
- call open(file,"doors:callback/prefix", 'R')
- do until eof(file)
- pre=readln(file)
- if typed=pre then goodprefix=1
- end
- call close(file)
- if goodprefix~=1 then do
- call blank
- string="Sorry, this program is not configured to handle out of area calls."
- call output
- call blank
- string="Press return..."
- call getkey
- signal getout
- end
- end
- return
-
- callback:
- call dropandcall doorname,linenumber,phonenumber
- success=upper(result)
- if success="CONNECT" then return
- signal error
-
- GETKEY:
- call hotkey doorname,linenumber,string
- hot=result
- call carrier
- return
-
- INPUT:
- call prompt doorname,linenumber,string,length
- typed=result
- if upper(typed)="NULL" then typed=""
- call carrier
- return
-
- OUTPUT:
- call message doorname,linenumber,string,1
- return
-
- MSG:
- call message doorname,linenumber,string,0
- return
-
- BLANK:
- string = " "
- call output
- return
-
- GETOUT:
- if sent ~=1 then call informsysop
- call blank
- string = "You've been using "||doorname||" by "||author||"."
- call output
- call blank
- string = "Thank you, "||username||", please press [RETURN] or [ENTER]."
- call getkey
- call blank
- call Exit_Door DoorName,LineNumber
- exit 0
-
- ERROR:
- call Exit_Door DoorName,LineNumber
- exit 0
-
- AddTime:
- call AddUserTime doorname,linenumber,minutes
- return
-
- Carrier:
- call CDetect doorname,linenumber
- cd=upper(result)
- if cd="NO CARRIER!" then signal error
- return
-
- GetMBNum:
- call GetMsgBaseNumber doorname,string,stype
- hot=result
- return
-
- drophim:
- call HangUp doorname,linenumber
- exit 0
-
-